This section describes the functions provided by the text channel component for formatting text to be previewed or added to a text track of a movie.
The SGSetFontName function sets the name of the font to be used to display text.
pascal ComponentResult SGSetFontName (
SGChannel c,
StringPtr pstr);
You call this function to specify a font for the text channel component. If the specified font is available on the system, the text channel uses the font to display text. If the specified font is not available, the text channel uses the default system font. For more information about fonts, see Inside Macintosh: Text.
The SGSetFontSize function sets the font size to be used to display text.
pascal ComponentResult SGSetFontSize (
SGChannel c,
short fontSize);
The SGSetTextForeColor function sets the color to be used to display text.
pascal ComponentResult SGSetTextForeColor (
SGChannel c,
RGBColor *theColor);
The SGSetTextBackColor function sets the background color to be used for the text box.
pascal ComponentResult SGSetTextBackColor (
SGChannel c,
RGBColor *theColor);
The SGSetJustification function sets the alignment to be used to display text.
pascal ComponentResult SGSetJustification (
SGChannel c,
short just);
You call this function, passing a text justification constant, to specify the alignment to be used for text in a text track. The text channel component justifies text relative to the boundaries of its text box. For more information on text alignment and the text justification constants, see the "TextEdit" chapter of Inside Macintosh: Text.
The SGGetTextReturnToSpaceValue function indicates whether the text channel component should replace return characters with spaces.
pascal ComponentResult SGGetTextReturnToSpaceValue (
SGChannel c,
short *rettospace);
When you capture text from a closed-caption television source, the text is composed of four lines of text of up to 32 characters each, each line separated by a return character. Sometimes it is useful to replace the return characters with spaces. You can call this function to determine whether the text channel component is replacing return characters with spaces.
The SGSetTextReturnToSpaceValue function sets whether the text channel component should replace return characters with spaces.
pascal ComponentResult SGSetTextReturnToSpaceValue (
SGChannel c,
short rettospace);
| Previous | Chapter Contents | Chapter Top |